<template>
  <div>
    <h3>子组件02</h3>
    <button @click="sendMsg">子组件02 向子组件01 发送消息</button>
  </div>
</template>

<script>
import pubsub from 'pubsub-js'

export default {
  name: "Child2-component",
  methods:{
    sendMsg(){
      pubsub.publish('hello','6666')
    }
  }
}
</script>

<style scoped>

</style>